<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<div class="mainBody" style="overflow: auto;">
    <div class="editBody">
        <?php echo form_open('param/do_edit/'.$chcodeinfo['chcode']); ?>
        <div class="bodyTitle" style="">
            <div class="titleIcon editTitle"></div>
            <p class="titleName fontDinproMedium" style="">修改配置参数</p>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">Channel Name:</p>
                <div class="rightContent">
                    <label class="fontDinpro" id="cname" name="cname"><?php echo $chcodeinfo['cname']; ?></label>
                    <?php if(form_error('cname')!=''){ ?>
                        <label class="waring fontDinpro"><?php echo form_error('cname'); ?></label>
                    <?php } ?>
                </div>
            </div>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">OS:</p>
                <div class="rightContent">
                    <?php $this->form->show_hidden('os',$os);?>
                    <label class="fontDinpro"><?php echo $os;?></label>
                </div>
            </div>
        </div>
       <div id="messagecontent" class="bodyDiv fontDinpro">
            <div class="divContent" style="margin-bottom:10px">
                <p class="fontDinproMedium">Group:</p>
                <div class="rightContent">
               	<?php
               		foreach($chcode_group_names as $k => $v):?>
               			<?php if(isset($params['group_id'])&&$params['group_id'] == $k):?>
							<li><input type="radio" value="<?php echo $k;?>" checked="checked" name="group_id"><label ><?php echo $v;?></label></li>
							<?php else:?>
							<li><input type="radio" value="<?php echo $k;?>"  name="group_id"><label ><?php echo $v;?></label></li>
							<?php endif;?>
               	<?php endforeach;?>
               	</div>
            </div>
        </div>

         <div id="messagecontent" class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">Params:</p>
                <div class="rightContent">
                <textarea rows="5" cols="10" id="params" name="params" placeholder="配置参数示例"><?php if(isset($params['params'])){
                			echo $params['params'];
                	}?></textarea>
				</div>
            </div>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">Force Icon:</p>
                <div class="rightContent">
                    <input type="radio" <?php if(isset($params['icon_flag'])&&$params['icon_flag'] == 1):?> checked="checked" <?php endif?> name='forceicon' value='1'>有</input>
                    <input type="radio" <?php if(!isset($params['icon_flag'])||$params['icon_flag'] == 0):?> checked="checked" <?php endif?> name='forceicon' value='0'>无</input>
                </div>
            </div>
        </div>

        <button class="btn submitBtn fontDinproBold" href="javascript:void(0)" type='submit'>SUMBIT</button>
        <?php echo form_close(); ?>
    </div>
</div>
